<template>
    <div class="nav">
        <el-menu :default-active="active" router background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
            <el-menu-item index="/">
                <i class="el-icon-s-home"></i>
                <span slot="title">系统首页</span>
            </el-menu-item>
            <el-submenu index="1">
                <template slot="title">
                    <i class="el-icon-s-finance"></i>
                <span>收益进账</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/order">订单查询</el-menu-item>
                    <el-menu-item index="/turnoverlist">营业额查询</el-menu-item>
                </el-menu-item-group>
            </el-submenu>
            <el-submenu index="2">
                <template slot="title">
                    <i class="el-icon-set-up"></i>
                <span>机器管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/myequipments">我的设备</el-menu-item>
                </el-menu-item-group>
            </el-submenu>
            <!-- <el-menu-item index="/ad">
                <i class="el-icon-video-camera-solid"></i>
                <span slot="title">广告管理</span>
            </el-menu-item>
            <el-menu-item index="/user">
                <i class="el-icon-user"></i>
                <span slot="title">用户列表</span>
            </el-menu-item> -->
            
        </el-menu>
    </div>
</template>
<script>
export default {
    data(){
        return{
            active:'/'
        }
    },
    mounted(){
        this.active = this.$route.path
        //console.log(this.$route)
    }
}
</script>
<style lang="scss" scoped>
    .nav{
        height: calc(100% - 60px);
        background-color: #545c64;
        .el-menu{
            border-right: solid 1px #545c64;
        }
    }
</style>